import {createRouter, createWebHistory} from 'vue-router';
import Home from '@/components/Home.vue';
import QueryTable from '@/components/QueryTable.vue';
import LogIn from "@/components/LogIn.vue";
import TeacherDashboard from "@/components/TeacherDashboard.vue";
import Student from '@/components/student.vue';
import CreatTask from '@/components/CreatTask.vue';
import LeaderDashBoard from '@/components/LeaderDashBoard.vue';
import TaskCalendar from "@/components/TaskCalendar.vue";
import ReferenceQuestionnaire from '@/components/ReferenceQuestionnaire.vue'; // 请替换为实际的组件路径
import TaskDetails from '@/components/TaskDetails.vue';
import TeamMembers from "@/components/TeamMembers.vue"; // 导入任务详情组件
import Settings from "@/components/Setting.vue"
import Discussion from "@/components/Discussion.vue";
import TeamApplication from '@/components/TeamApplication.vue';
import SelectLeader from '@/components/SelectLeader.vue';//导入小组互选组件
import Report from '@/components/Report.vue'
import StudentScoring from '@/components/StudentScoring.vue'
import CreateSubtask from '@/components/CreateSubtask.vue'
import TaskAnalysis from "@/components/TaskAnalysis.vue";
import DocumentPage from '@/components/DocumentPage.vue'; // 导入产品文档组件
import Sparkiepath from "@/components/sparkiepath.vue";

const routes = [
    {
        path: '/', // 默认路径
        name: 'Home',
        component: Home, // 显示 Hello World 页面
    },
    {
        path: '/query', // 查询表格路径
        name: 'QueryTable',
        component: QueryTable, // 显示查询表格页面
    },
    {
        path: "/login",
        name: "LogIn",
        component: LogIn
    },
    {
        path: '/teacher',
        name: 'TeacherDashboard',
        component: TeacherDashboard
    },
    {
        path: '/student',
        name: 'student',
        component: Student
    },
    {
        path: '/createtask',
        name: 'CreatTask',
        component: CreatTask
    },
    {
        path: '/leader-dashboard',
        name: 'LeaderDashboard',
        component: LeaderDashBoard
    },
    { path: "/", component: LeaderDashBoard },
    { path: "/tasks", component: TaskCalendar },
    { path: '/task-calendar', component: TaskCalendar },
    {
        path: '/reference-questionnaire',
        name: 'ReferenceQuestionnaire',
        component: ReferenceQuestionnaire
    },
    {path: '/task-details', component: TaskDetails }, // 添加 TaskDetails 路由
    { path: '/members', component: TeamMembers },
    { path: '/settings', component: Settings },
    { path: '/discussion', component: Discussion},
    { path: '/reference-questionnaire', component: () => import('@/components/ReferenceQuestionnaire.vue') },
    { path: '/report', name: 'Report', component: Report },
    { path: '/student-scoring', name: 'StudentScoring', component: StudentScoring },
    {
      path: '/team-application',
      name: 'TeamApplication',
      component: TeamApplication
    },
    {
      path: '/select-leader',
      name: 'SelectLeader',
      component: SelectLeader
    },
    {
        path: '/create-subtask',
        name: 'CreateSubtask',
        component: CreateSubtask
    },
    {
        path: '/task-analysis',
        name: 'TaskAnalysis',
        component: TaskAnalysis
    },
    {
        path: '/document',
        name: 'DocumentPage',
        component: DocumentPage
    },
    {
        path: '/sparkiepath',
        name: 'sparkiepath',
        component: Sparkiepath
    },
];

const router = createRouter({
  history: createWebHistory(),
  routes
});

export default router;